<template>
  <div class="home-container">
    <!-- 英雄区域 -->
    <div class="hero-section">
      <div class="hero-content">
        <h1>乐谱智识-音乐教育平台</h1>
        <p>使用人工智能技术，将纸质乐谱转换为数字音乐</p>
        <div class="hero-buttons">
          <router-link to="/scanner" class="btn primary">开始识别</router-link>
          <router-link to="/community" class="btn secondary">加入社区</router-link>
        </div>
      </div>
      <div class="hero-image">
        <div class="floating-notes">
          <div class="note note-1">♪</div>
          <div class="note note-2">♩</div>
          <div class="note note-3">♫</div>
          <div class="note note-4">♬</div>
          <div class="note note-5">♭</div>
          <div class="note note-6">♯</div>
        </div>
      </div>
    </div>

    <!-- 功能特点区域 -->
    <div class="features-section" data-animation="animate__fadeInUp">
      <h2>强大功能，简单操作</h2>
      <div class="features-grid">
        <div class="feature-card" data-animation="animate__fadeInUp">
          <div class="feature-icon">
            <i class="icon-scan">📷</i>
          </div>
          <h3>快速识别</h3>
          <p>通过拍照或上传乐谱图片，快速识别音符、节拍和调号</p>
        </div>
        <div class="feature-card" data-animation="animate__fadeInUp">
          <div class="feature-icon">
            <i class="icon-play">🎵</i>
          </div>
          <h3>即时播放</h3>
          <p>识别结果可即时播放，让您直观了解乐谱内容</p>
        </div>
        <div class="feature-card" data-animation="animate__fadeInUp">
          <div class="feature-icon">
            <i class="icon-save">💾</i>
          </div>
          <h3>保存分享</h3>
          <p>轻松保存识别结果，或分享给朋友和音乐社区</p>
        </div>
        <div class="feature-card" data-animation="animate__fadeInUp">
          <div class="feature-icon">
            <i class="icon-ai">🤖</i>
          </div>
          <h3>AI助手</h3>
          <p>智能音乐助手帮助您解答乐理问题和提供建议</p>
        </div>
        <div class="feature-card" data-animation="animate__fadeInUp">
          <div class="feature-icon">
            <i class="icon-export">🎼</i>
          </div>
          <h3>MIDI导出</h3>
          <p>将识别的乐谱转换为MIDI格式，便于编辑和创作</p>
        </div>
        <div class="feature-card" data-animation="animate__fadeInUp">
          <div class="feature-icon">
            <i class="icon-community">👥</i>
          </div>
          <h3>音乐社区</h3>
          <p>加入音乐爱好者社区，分享您的作品与见解</p>
        </div>
      </div>
    </div>

    <!-- 用户反馈区域 -->
    <div class="testimonials-section" data-animation="animate__fadeInUp">
      <h2>用户反馈</h2>
      <div class="testimonials-carousel">
        <div class="testimonial-item" data-animation="animate__fadeInLeft">
          <div class="testimonial-content">
            <p>"这个工具帮我省下了大量记谱的时间，现在我可以更专注于创作了！"</p>
          </div>
          <div class="testimonial-author">
            <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="用户头像" class="author-avatar" />
            <div class="author-info">
              <p class="author-name">李明</p>
              <p class="author-title">音乐老师</p>
            </div>
          </div>
        </div>
        <div class="testimonial-item" data-animation="animate__fadeInRight">
          <div class="testimonial-content">
            <p>"AI识别的准确率令人惊讶，我用它来学习古典乐谱，效果非常好！"</p>
          </div>
          <div class="testimonial-author">
            <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="用户头像" class="author-avatar" />
            <div class="author-info">
              <p class="author-name">张文</p>
              <p class="author-title">音乐学院学生</p>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- 号召行动区域 -->
    <div class="cta-section" data-animation="animate__fadeInUp">
      <h2>立即开始您的音乐之旅</h2>
      <p>免费试用乐谱智识-音乐教育平台，提升您的音乐体验</p>
      <router-link to="/scanner" class="btn cta-btn">开始使用</router-link>
    </div>
  </div>
</template>

<script>
import { API_ENDPOINTS } from '../config'
import axios from 'axios'

export default {
  name: 'HomeView',
  data() {
    return {
      observer: null,
      animated: false
    }
  },
  mounted() {
    // 创建一个Intersection Observer来检测元素何时进入视口
    this.setupScrollAnimations();
    
    // 添加页面载入动画
    this.animateOnLoad();
  },
  beforeUnmount() {
    // 清理observer
    if (this.observer) {
      this.observer.disconnect();
    }
  },
  methods: {
    setupScrollAnimations() {
      this.observer = new IntersectionObserver((entries) => {
        entries.forEach(entry => {
          if (entry.isIntersecting) {
            // 添加动画类
            const animation = entry.target.dataset.animation;
            entry.target.classList.add('animate__animated', animation);
            
            // 如果是特殊元素，添加额外的动画效果
            if (entry.target.classList.contains('feature-card')) {
              const index = Array.from(entry.target.parentNode.children).indexOf(entry.target);
              entry.target.style.animationDelay = `${0.1 * (index % 3)}s`;
              entry.target.classList.add('animate__faster');
            }
            
            // 取消观察
            this.observer.unobserve(entry.target);
          }
        });
      }, {
        threshold: 0.15, // 当15%的元素可见时触发
        rootMargin: '0px 0px -80px 0px' // 调整触发区域
      });
      
      // 观察所有带有data-animation属性的元素
      document.querySelectorAll('[data-animation]').forEach(el => {
        // 初始隐藏
        el.style.opacity = '0';
        this.observer.observe(el);
      });
    },
    
    animateOnLoad() {
      if (this.animated) return;
      
      const heroContent = document.querySelector('.hero-content');
      const features = document.querySelector('.features-section');
      const testimonials = document.querySelector('.testimonials-section');
      const cta = document.querySelector('.cta-section');
      const notes = document.querySelectorAll('.note');
      
      // 英雄区域动画
      if (heroContent) {
        heroContent.style.opacity = '0';
        heroContent.style.transform = 'translateY(20px)';
        
        setTimeout(() => {
          heroContent.style.transition = 'opacity 0.8s ease, transform 0.8s ease';
          heroContent.style.opacity = '1';
          heroContent.style.transform = 'translateY(0)';
        }, 300);
      }
      
      // 增强音符动画
      notes.forEach((note, index) => {
        note.style.opacity = '0';
        note.style.transform = 'scale(0.5)';
        
        setTimeout(() => {
          note.style.transition = 'opacity 0.8s ease, transform 0.8s ease';
          note.style.opacity = '0.7';
          note.style.transform = 'scale(1)';
        }, 500 + (index * 150));
      });
      
      // 其他部分延迟动画设置
      [features, testimonials, cta].forEach((el, index) => {
        if (el) {
          el.dataset.animation = 'animate__fadeInUp';
          el.style.opacity = '0';
          el.style.animationDelay = `${(index + 1) * 0.2}s`;
        }
      });
      
      this.animated = true;
    },

    async uploadImage() {
      try {
        const formData = new FormData()
        formData.append('file', this.selectedFile)
        
        await axios.post(API_ENDPOINTS.upload, formData, {
          headers: {
            'Content-Type': 'multipart/form-data'
          },
          responseType: 'blob'
        })
        // ... existing code ...
      } catch (error) {
        // ... existing code ...
      }
    }
  }
}
</script>

<style scoped>
.home-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f9faff;
  overflow-x: hidden;
}

.dark-theme .home-container {
  background-color: #1a1a1a;
}

/* 英雄区域样式 */
.hero-section {
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: white;
  padding: 5rem 2rem;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(67, 97, 238, 0.2);
}

.dark-theme .hero-section {
  background: linear-gradient(135deg, #2a2a35, #1a1a1a);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.6;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  z-index: 2;
  position: relative;
  text-align: center;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3.25rem;
  margin-bottom: 1.25rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.5px;
  animation: fadeInUp 0.8s ease-out;
  text-align: center;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
  text-align: center;
}

.hero-buttons {
  display: flex;
  gap: 1.25rem;
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
  opacity: 0;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.btn.primary {
  background-color: white;
  color: #3a0ca3;
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.25);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.btn.secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark-theme .btn.secondary {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dark-theme .btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.hero-image {
  flex: 1;
  position: relative;
  height: 350px;
}

.floating-notes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.note {
  position: absolute;
  font-size: 3.5rem;
  animation: float 6s infinite ease-in-out;
  opacity: 0.7;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
  text-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.note-1 {
  top: 20%;
  left: 40%;
  animation-delay: 0s;
  font-size: 4.5rem;
}

.note-2 {
  top: 40%;
  left: 60%;
  animation-delay: 1s;
  font-size: 5.5rem;
}

.note-3 {
  top: 60%;
  left: 30%;
  animation-delay: 2s;
  font-size: 4rem;
}

.note-4 {
  top: 30%;
  left: 70%;
  animation-delay: 3s;
  font-size: 5rem;
}

.note-5 {
  top: 15%;
  left: 20%;
  animation-delay: 1.5s;
  font-size: 4.2rem;
}

.note-6 {
  top: 70%;
  left: 65%;
  animation-delay: 2.5s;
  font-size: 3.8rem;
}

/* 功能特点区域样式 */
.features-section {
  padding: 5rem 2rem;
  text-align: center;
  background-color: white;
  position: relative;
  z-index: 1;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.dark-theme .features-section {
  background-color: #252530;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.features-section h2 {
  font-size: 2.25rem;
  margin-bottom: 3rem;
  color: #333;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.dark-theme .features-section h2 {
  color: #e0e0e0;
}

.features-section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #4361ee, #3a0ca3);
  border-radius: 2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background-color: #fff;
  border-radius: 15px;
  padding: 2.5rem 1.8rem;
  transition: all 0.4s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(67, 97, 238, 0.05);
  position: relative;
  overflow: hidden;
}

.dark-theme .feature-card {
  background-color: #1e1e24;
  border-color: rgba(67, 97, 238, 0.1);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.05), rgba(58, 12, 163, 0.05));
  top: 0;
  left: 0;
  transform: translateY(100%);
  transition: transform 0.4s ease-out;
  z-index: -1;
}

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 15px 35px rgba(67, 97, 238, 0.1);
  border-color: rgba(67, 97, 238, 0.1);
}

.feature-card:hover::before {
  transform: translateY(0);
}

.feature-icon {
  margin-bottom: 1.5rem;
  font-size: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(58, 12, 163, 0.1));
  color: #4361ee;
  transition: all 0.3s ease;
}

.dark-theme .feature-icon {
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.2), rgba(58, 12, 163, 0.2));
  color: #5f7fff;
  box-shadow: 0 0 20px rgba(67, 97, 238, 0.2);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.15), rgba(58, 12, 163, 0.15));
  box-shadow: 0 10px 25px rgba(67, 97, 238, 0.15);
}

.dark-theme .feature-card:hover .feature-icon {
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.3), rgba(58, 12, 163, 0.3));
  color: #7f9fff;
  box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
}

.feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #333;
  font-weight: 600;
  transition: all 0.3s ease;
}

.dark-theme .feature-card h3 {
  color: #e0e0e0;
}

.feature-card p {
  color: #666;
  line-height: 1.7;
  font-size: 1.05rem;
}

.dark-theme .feature-card p {
  color: #aaaaaa;
}

/* 用户反馈区域样式 */
.testimonials-section {
  padding: 5rem 2rem;
  background-color: #f3f4ff;
  text-align: center;
  position: relative;
}

.dark-theme .testimonials-section {
  background-color: #1a1a1a;
}

.testimonials-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, white, #f3f4ff);
}

.dark-theme .testimonials-section::before {
  background: linear-gradient(to bottom, #252530, #1a1a1a);
}

.testimonials-section h2 {
  font-size: 2.25rem;
  margin-bottom: 3rem;
  color: #333;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.dark-theme .testimonials-section h2 {
  color: #ffffff;
}

.testimonials-section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #4361ee, #3a0ca3);
  border-radius: 2px;
}

.dark-theme .testimonials-section h2::after {
  background: linear-gradient(90deg, #5f7fff, #7f9fff);
}

.testimonials-carousel {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.testimonial-item {
  background-color: white;
  border-radius: 15px;
  padding: 2.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
  max-width: 450px;
  transition: all 0.3s ease;
  border: 1px solid rgba(67, 97, 238, 0.05);
}

.dark-theme .testimonial-item {
  background-color: #252530;
  border-color: rgba(67, 97, 238, 0.1);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.testimonial-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(67, 97, 238, 0.08);
}

.testimonial-content {
  margin-bottom: 1.75rem;
}

.testimonial-content p {
  font-style: italic;
  color: #444;
  line-height: 1.7;
  font-size: 1.1rem;
  position: relative;
}

.dark-theme .testimonial-content p {
  color: #d1d5db;
}

.testimonial-content p::before,
.testimonial-content p::after {
  content: '"';
  font-size: 2.5rem;
  color: rgba(67, 97, 238, 0.1);
  position: absolute;
  font-style: normal;
  font-family: serif;
}

.testimonial-content p::before {
  top: -20px;
  left: -10px;
}

.testimonial-content p::after {
  bottom: -40px;
  right: -10px;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-right: 1rem;
  object-fit: cover;
  border: 3px solid rgba(67, 97, 238, 0.1);
}

.author-info {
  text-align: left;
}

.author-name {
  font-weight: 600;
  color: #333;
  margin: 0;
  font-size: 1.1rem;
}

.dark-theme .author-name {
  color: #e0e0e0;
}

.author-title {
  color: #777;
  font-size: 0.95rem;
  margin: 5px 0 0 0;
}

.dark-theme .author-title {
  color: #aaaaaa;
}

/* 号召行动区域样式 */
.cta-section {
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: white;
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dark-theme .cta-section {
  background: linear-gradient(135deg, #2a2a35, #1a1a1a);
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.6;
}

.dark-theme .cta-section::before {
  opacity: 0.3;
}

.cta-section h2 {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  font-weight: 700;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

.cta-btn {
  background-color: white;
  color: #3a0ca3;
  font-size: 1.1rem;
  padding: 1.1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-block;
  position: relative;
  z-index: 1;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
}

.cta-btn:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-15px) rotate(3deg) scale(1.03);
  }
  50% {
    transform: translateY(-25px) rotate(5deg) scale(1.05);
  }
  75% {
    transform: translateY(-10px) rotate(2deg) scale(1.02);
  }
}

/* 响应式 */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    padding: 4rem 1.5rem;
  }
  
  .hero-content {
    text-align: center;
    margin-bottom: 3rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonials-carousel {
    flex-direction: column;
    align-items: center;
  }
  
  .feature-card {
    padding: 2rem 1.5rem;
  }
  
  .cta-section h2 {
    font-size: 2rem;
  }

  /* 移动端隐藏音符 */
  .floating-notes {
    display: none;
  }
  
  .hero-image {
    display: none;
  }
}
</style> 